<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__ROOT__/layui/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="__ROOT__/layui/css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<div class="layui-form layuimini-form">
    <input value="{$list.id}" name="id" style="display: none;">
    <blockquote class="layui-elem-quote">
        待审核技术信息<br>
    </blockquote>
    <div class="layui-form-item">
        <label class="layui-form-label required">技术编号</label>
        <div class="layui-input-block">
            <input type="text" name="num" lay-verify="required" value="{$list.num}" class="layui-input" readonly>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label required">技术姓名</label>
        <div class="layui-input-block">
            <input type="text" name="name" lay-verify="required"  value="{$list.name}" class="layui-input" readonly>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否通过</label>
        <div class="layui-input-block">
            <input type="radio" name="pass" value="1" title="通过" checked="">
            <input type="radio" name="pass" value="0" title="不通过">
        </div>
    </div>


    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认提交</button>
        </div>
    </div>
</div>
</div>
<script src="__ROOT__/layui/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>

<script>
    layui.use(['form'], function () {
        var form = layui.form,
            layer = layui.layer,
            laydate = layui.laydate;
        $ = layui.$;

        //监听提交
        form.on('submit(saveBtn)', function (data) {
            var url = "{:url('developer/up_check')}";
            var data=(data.field);
            var success = "{:url('developer/check')}";
            //    执行异步请求 ，$.post
            $.post(url,data,function(result){
                if(result.status ==0){
                    layer.open({
                        content:result.message,
                        icon:2,
                        title : '错误提示'
                    });

                }
                if(result.status ==1){
                    layer.open({
                        content : result.message,
                        icon : 1,
                        yes : function(){
                            // location.href=success;
                            setTimeout(function () {
                                window.parent.location.reload(); //刷新父页面
                                var index = parent.layer.getFrameIndex(window.name)
                                parent.layer.close(index);
                            }, 500);
                        }
                    });

                }

            },'JSON');
            return false;

        });
    });

</script>
</body>
</html>